<div id="content">
	<h2>Buku Tamu</h2>
		<a href="?page=addbukutamu">Tinggalkan Komentar</a><br><br><br>
		<?php
		require ('class/config.php');
		$sql = mysql_query("SELECT * FROM `bukutamu`");
		$total = mysql_num_rows($sql);
		if ($total > 0) {
			while ($row = mysql_fetch_array($sql)) {
				if ($row['username'] == "admin") {
					$nama = "Administrator";
				} else {
					$nama = $row['nama'];
				}
				echo '<table border="0" cellpadding="2" cellspacing="2" width=100%>
						<tr bgcolor="#333">
							<td>'.$nama.' </td>
						</tr>
						<tr bgcolor="#ccc">
							<td colspan="2">'.$row['isi_bukutamu'].'</td>
						</tr>
						</table>
						<br>
					  ';
			}
		} else {
			echo '<table border="0" cellpadding="2" cellspacing="2" width=95% >
				<tr>
					<td>BELUM ADA KOMENTAR</td>
				</tr>
				</table>';
		}
		
		
		?>	

</div>
